import api, { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import Vue from 'vue'
import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
import { axios } from '@/utils/request'

//流管控平台-系统配置接口
//查询所有配置
const getSysConfigs = (params) => postAction('/dcloud-flink-stream-platform//api/systemConfig/v1/sysConfig')
//修改配置
const updateSysConfigs = (params) => postAction('/dcloud-flink-stream-platform//api/systemConfig/v1/update',params)
//删除配置
const deleteSysConfig = (params) => deleteAction('/dcloud-flink-stream-platform//api/systemConfig/v1/delete', params)

//获取保存点
const getSpHistory = (params) => getAction('/dcloud-flink-stream-platform/api/jobConfig/v1/savepoint/history',params)

const restoreSp = (params) => postAction('/dcloud-flink-stream-platform/api/jobConfig/v1/start',params)

//触发保存点
const savepoint = (params) => getAction('/dcloud-flink-stream-platform/api/jobConfig/v1/savepoint',params)

export {
  getSysConfigs,
  updateSysConfigs,
  deleteSysConfig,
  getSpHistory,
  restoreSp,
  savepoint
}



